Repository navigation
Update tzinfo file, generated from Java 21 - tzdata 2023c - #603
Conversation
|
Please don't merge yet - there still seems to be an issue with historic Europe/Istanbul timezones |
|
There was an issue in the Java code used to generate tzinfo.csv, which I've raised with Kx here. It only considered DST changes, but not when a timezone changed its base offset or what happened when DST was no longer used in a timezone. I have an updated copy of the Java code to generate tzinfo.csv, which looks at when the offset changes rather than just considering DST. I'm hoping to share this code on the linked PR. I have committed an updated copy of tzinfo in this PR. A few changes to note:
Comparing the old and new files for the overlapping date range shows they largely match: The larger counts for the old file are due to the dropped three-letter codes, mentioned previously. EST,HST,MST,ACT,AET,AGT,ART,AST,BET,BST,CAT,CNT,CST,CTT,EAT,ECT,IET,IST,JST,MIT,NET,NST,PLT,PNT,PRT,PST,SST,VST |
|
Thanks for this @erichards97. Is there anyway we can get the three letter codes back? I highly suspect that people will be using some of the more common shortcodes. I presume all the shortcodes have a 1-to-1 mapping with a city, so maybe for example a solution would be to copy America/New_York to EST on load? Or put a mapping into the tz functionality to handle the shortcodes? My guess would be most of the usage in torq is via the functions rather than accessing the table directly. |
|
tzinfo.csv generation code fyi - KxSystems/cookbook#10 |
|
Thanks for this @erichards97 |
Running the tickerplant suites on several engines turned up failures that are not engine differences at all: they fail on kdb+ on master. Three are bugs in the segmented tickerplant, and the rest are tests that fell behind the code. All of it is in tests/stp or the code those tests exercise. Tickerplant bugs - End of day and end of period called .stpps.pubclear[.stplg.t]. That list is every table in the process, including logmsg, but pubclear resets each table from the publish schemas, which since DataIntellectTech#638 have no entry for logmsg. A dictionary of tables returns an empty copy of its first table for a key it doesn't have, so at every roll logmsg was quietly replaced by an empty table with another table's columns. The three calls now pass .stpps.t, as the batch code already does. - The exit handler closed .stpps.t, the published tables, although a log is opened for every table. On a clean shutdown the logmsg log stayed open and its row in the meta table kept a null end time. It now closes .stplg.logtabs, the same list end of day uses. - A chained tickerplant that is not creating logs replaces the loghandles view with a dictionary of no-ops (DataIntellectTech#368). If it was then switched to create its own logs, the logs were opened but nothing was written to them, because loghandles was still that dictionary. The view is now restored when a chained tickerplant opens logs. Tests that were wrong - stp/pubsub: seven rows from DataIntellectTech#391 call rdbHandle, which the suite never defines. They now use the suite's own publisher, with one row that gives it trades to filter. - stp/eod and three chained suites still called .stplg.stpeod, which DataIntellectTech#523 folded into .stplg.endofday. - stp/eod, stp/periodend, stp/chainedperiodend sized the meta table by the publish list, which is one short since DataIntellectTech#638. - stp/tz upserted six values into the time zone table, which has had four columns since the tzinfo file was regenerated in DataIntellectTech#603. - stp/custommode expects quote_iex, trade_iex and heartbeat. The Starter Pack dropped the _iex tables, so the suite now has its own schema file. It also moved the logs with setenv on KDBTPLOG, which the tickerplant has read once at start-up since DataIntellectTech#638; it now sets .stplg.kdbtplog. Its bad update is a one-item list and its file count is compared by value, so the same rows also hold on Korze and L. - Seven run.sh passed -results where runtests.q reads -testresults, so those suites never wrote a results file; two also left out $write. - helperfunctions.q: gethandle opened a new handle on every call and never closed the old one. A process has a limit on open connections, and stp/wdb reopened handles often enough to reach it. On KDB-X 5.0, master against this branch: stp/pubsub 34/41 to 42/42, eod 10/15 to 15/15, exit 4/5 to 5/5, periodend 6/8 to 8/8, tz 26/31 to 31/31, custommode 39/47 to 47/47, chainedstp 37/40 to 40/40, and stp/wdb 73/96 to 96/96.


The current tzinfo file is outdated, e.g. it had the DST change as 2015.10.25 for Europe/Istanbul, when it was actually 2015.11.08
New tzinfo generated using the Java and q code here: https://code.kx.com/q/kb/timezones/